import Layout from '@/layout'

export const constantRoutes = [
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true,
  },
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    name: '首页',
    children: [
      {
        path: 'dashboard',
        component: () => import('@/views/dashboard/index'),
        name: 'Dashboard',
        meta: { title: '首页', icon: 'dashboard', affix: true },
      },
    ],
  },
]

export const asyncRoutes = [
  {
    path: '/Example',
    component: Layout,
    name: 'Example',
    meta: {
      title: 'Example',
      icon: 'component',
    },
    children: [
      {
        path: 'index',
        component: () => import('@/views/icons/index'),
        name: 'Icons',
        meta: { title: 'Icons', noCache: true },
      },
      {
        path: 'a',
        component: () => import('@/views/a'),
        name: 'a',
        meta: { title: 'a', noCache: true },
      },
    ],
  },
]

export default constantRoutes
